package com.example.administrator.printoutindemo.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.example.administrator.printoutindemo.mvp.contract.ZhouBaoContract;
import com.example.administrator.printoutindemo.mvp.model.ZhouBaoModel;


@Module
public class ZhouBaoModule {
    private ZhouBaoContract.View view;

    /**
     * 构建ZhouBaoModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ZhouBaoModule(ZhouBaoContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ZhouBaoContract.View provideZhouBaoView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ZhouBaoContract.Model provideZhouBaoModel(ZhouBaoModel model) {
        return model;
    }
}